package com.njbw.user.designPattern.abstractFactoryPattern.easy;

import java.util.Objects;

public class ColorFactory extends AbstractFactory {

    @Override
    public Color getColor(String color) {
        if (Objects.isNull(color)) return null;
        if (color.equalsIgnoreCase("BLUE")) {
            return new Blue();
        } else if (color.equalsIgnoreCase("RED")) {
            return new Red();
        } else if (color.equalsIgnoreCase("GREEN")) {
            return new Green();
        }
        return null;
    }

    @Override
    public Shape getShape(String shape) {
        return null;
    }
}
